package cz.uvn.orthopedy.client.entity;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable
public class Patient extends Person implements IsSerializable {

	// Rodné číslo
	@Persistent
	private String rodneCislo;
	
	// Pojišťovna
	@Persistent
	private Long insuranceID;

	// Adresa
	@Persistent
	private String address;

	// Telefon
	@Persistent
	private String phoneNumber;

	// Email
	@Persistent
	private String email;
	
	// Pracovni Neschopnost
	@Persistent
	private boolean workAbsence;

	// Nadstandard
	@Persistent
	private boolean nadstandard;

	public Patient() {
	}

	public Patient(Long id, String name, String surname, String rodneCislo, Long insuranceID,
					String address, String phoneNumber, String email, boolean workAbsence, boolean nadstandard) {
		this.id = id;
		this.name = name;
		this.surname = surname;
		this.rodneCislo = rodneCislo;
		this.insuranceID = insuranceID;
		this.address = address;
		this.phoneNumber = phoneNumber;
		this.email = email;
		this.workAbsence = workAbsence;
		this.nadstandard = nadstandard;
	}

	public String getRodneCislo() {
		return rodneCislo;
	}

	public void setRodneCislo(String rodneCislo) {
		this.rodneCislo = rodneCislo;
	}

	public Long getInsuranceID() {
		return insuranceID;
	}

	public void setInsuranceID(Long insuranceID) {
		this.insuranceID = insuranceID;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	public boolean isWorkAbsence() {
		return workAbsence;
	}

	public void setWorkAbsence(boolean workAbsence) {
		this.workAbsence = workAbsence;
	}

	public boolean isNadstandard() {
		return nadstandard;
	}

	public void setNadstandard(boolean nadstandard) {
		this.nadstandard = nadstandard;
	}

	@Override
	public String toString() {
		return "Patient " + name + ' ' + surname;
	}
}
